package com.briup.day07.bean;

public class Teacher {
    private String name;
    private double salary;
    public Teacher(){
        //this可以调用其他构造方法 但必须是第一行有效代码
        this("ronda",1900.0);
        this.name=name;
        System.out.println("Teacher constructor");
    }
    public Teacher(String name){
        this.name=name;
    }
    public Teacher(String name, double salary){
        this.name=name;
        this.salary=salary;
        System.out.println("Teacher constructor  name: "+name+", salary: "+salary);
    }
    public void show(){
        System.out.println("老师姓名: "+name+", 老师工资: salary: "+salary);
    }
}
